package com.zrgk.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.zrgk.bean.RoleBean;
import com.zrgk.dao.RoleDao;

@Service(value="roleService")
@Transactional(propagation =Propagation.REQUIRED)
public class RoleServiceImpl implements RoleService{
	@Autowired
	@Qualifier(value="roleDao")
	private RoleDao roleDao;
	
	public RoleDao getRoleDao() {
		return roleDao;
	}

	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}

	public List<RoleBean> findAllRole() {
		
		return roleDao.selectAllRole();
	}

	public RoleBean findRoleById(int id) {

		return roleDao.selectRoleById(id);
	}

	public void addRole(RoleBean role) {
		
	}

	public int deleteRole(int id) {

		return 0;
	}

	public void updateRole(RoleBean role) {
		
		
	}

}
